import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_utils/flutter_utils.dart';

void main() {
  group('string_utils test', () {
    test('isNullOrEmpty', () {
      const text = '';
      const text2 = 'abc';
      const text3 = null;
      expect(StringUtil.isNullOrEmpty(text), true);
      expect(StringUtil.isNullOrEmpty(text2), false);
      expect(StringUtil.isNullOrEmpty(text3), true);
    });

    test('isChinese', () {
      const text = '你';
      const text2 = '你abc';
      const text3 = 'abc';
      expect(StringUtil.isChinese(text), true);
      expect(StringUtil.isChinese(text2), true);
      expect(StringUtil.isChinese(text3), false);
    });
  });
}
